//
//package com.example.file_management.mapper;
//
//import com.example.file_management.pojo.material.Resource;
//import com.example.file_management.pojo.material.SelfCheck;
//import org.apache.ibatis.annotations.*;
//
//import java.util.List;
//
//
//@Mapper
//public interface SelfCheckMapper {
//
//    @Insert("INSERT INTO self_inspection (task_id, check_name, check_description, check_status, check_date) " +
//            "VALUES (#{taskId}, #{checkName}, #{checkDescription}, #{checkStatus}, #{checkDate})")
//    @Options(useGeneratedKeys = true, keyProperty = "selfCheckId")
//    int insertSelfInspection(SelfCheck selfInspection);
//
//    @Select("SELECT * FROM self_inspection WHERE task_id = #{taskId}")
//    List<SelfCheck> getSelfInspectionsByTaskId(int taskId);
//
//    @Update("UPDATE self_inspection SET check_name = #{checkName}, check_description = #{checkDescription}, " +
//            "check_status = #{checkStatus}, check_date = #{checkDate} WHERE self_check_id = #{selfCheckId}")
//    int updateSelfInspection(SelfCheck selfInspection);
//
//    @Delete("DELETE FROM self_inspection WHERE self_check_id = #{selfCheckId}")
//    int deleteSelfInspection(int selfCheckId);
//}
package com.example.file_management.mapper.material;

import com.example.file_management.pojo.material.SelfCheck;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
@JsonSerialize(using = LocalDateTimeSerializer.class)
@JsonDeserialize(using = LocalDateTimeDeserializer.class)

public interface SelfCheckMapper {
    int insertSelfInspection(SelfCheck selfInspection);
    List<SelfCheck> getSelfInspectionsByTaskId(int taskId);
    int updateSelfInspection(SelfCheck selfInspection);
    int deleteSelfInspection(int selfCheckId);
}